﻿// <copyright file="ResolveDataArgs.cs" company="Todd Aspeotis">
//  Copyright © 2011 Todd Aspeotis
// </copyright>

namespace LocalReportsEngine.Providers
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using LocalReportsEngine.ReportDefinitionElements;

    public class ResolveDataSourceHandlerArgs : EventArgs
    {
        public ReportElement ReportElement { get; set; }

        public DataSourceElement DataSourceElement { get; set; }

        public string Name { get; set; }

        public object Result { get; set; }
    }

    public class ResolveDataSetHandlerArgs : EventArgs
    {
        public ReportElement ReportElement { get; set; }

        public DataSetElement DataSetElement { get; set; }

        public object DataSource { get; set; }

        public string Name { get; set; }

        public object Result { get; set; }
    }

    public delegate void ResolveDataSourceHandler(object sender, ResolveDataSourceHandlerArgs arguments);

    public delegate void ResolveDataSetHandler(object sender, ResolveDataSetHandlerArgs arguments);

    public class ResolveDataArgs
    {
        public ReportElement ReportElement { get; set; }

        public Dictionary<string, object> DataSets { get; set; }

        public Dictionary<string, object> DataSources { get; set; }

        public EventHandler<ResolveDataSourceHandlerArgs> OnResolveDataSource;

        public EventHandler<ResolveDataSetHandlerArgs> OnResolveDataSet;

        public object EventSender { get; set; }
    }
}
